package com.espresso.espressodemo;

import android.test.ActivityInstrumentationTestCase2;
import android.test.suitebuilder.annotation.LargeTest;

import static android.support.test.espresso.Espresso.onView;
import static android.support.test.espresso.action.ViewActions.click;
import static android.support.test.espresso.action.ViewActions.closeSoftKeyboard;
import static android.support.test.espresso.action.ViewActions.typeText;
import static android.support.test.espresso.action.ViewActions.typeTextIntoFocusedView;
import static android.support.test.espresso.assertion.ViewAssertions.matches;
import static android.support.test.espresso.matcher.ViewMatchers.isDisplayed;
import static android.support.test.espresso.matcher.ViewMatchers.withId;
import static android.support.test.espresso.matcher.ViewMatchers.withText;

/**
 * Created by lenov on 2015/7/13.
 */
@LargeTest
public class TextActivityTest extends ActivityInstrumentationTestCase2<TextActivity> {
    public TextActivityTest() {
        super(TextActivity.class);
    }

    @Override
    public void setUp() throws Exception {
        super.setUp();
        // Espresso will not launch our activity for us, we must launch it via getActivity().
        getActivity();
    }

    public void testInputText() {
        onView(withId(R.id.tv_text)).check(matches(isDisplayed()));
//        onView(withId(R.id.et_text)).perform(click())
//                .perform(typeTextIntoFocusedView("123456789"), closeSoftKeyboard());
    }
}
